<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.sms.day_report.*, com.sms.servlet.*"%>
<%@ page import="net.sf.json.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
request.setCharacterEncoding("UTF-8");
List<Map> jlist=new ArrayList<Map> ();
    	jlist=Day_report.queryall();
    	//System.out.println(jlist.size());
    	JSONArray json = new JSONArray(); 
    	 for(int i=0;i<jlist.size();i++){
    		 Map map=jlist.get(i);    		  		
    		
    		 JSONObject j=new JSONObject();
    		 j.put("p_reportid", map.get("p_reportid"));
    		 j.put("fromid",map.get("fromid"));
    		 j.put("fromname", map.get("fromname")); 
    		 j.put("toid",map.get("toid"));    		  
    		 j.put("toname", map.get("toname"));  
    		 j.put("p_reporttime",map.get("p_reporttime").toString());
    		 j.put("content", map.get("content"));
    		 json.add(j);
    	 }
    	 System.out.println(json);
out.println(json);
 %>
